package org.geeks.gsspringsecurity.repository;

import org.geeks.gsspringsecurity.GsSpringSecurityApplicationTests;
import org.geeks.gsspringsecurity.biz.domain.Authority;
import org.geeks.gsspringsecurity.biz.repository.AuthorityRepository;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 权限测试
 * 
 * @author Geek-S
 *
 */
public class AuthorityRepositoryT extends GsSpringSecurityApplicationTests {

	@Autowired
	private AuthorityRepository authorityRepository;

	/**
	 * 添加测试权限
	 */
	@Test
	public void save() {
		for (int i = 0; i < 7; i++) {
			Authority authority = new Authority();
			authority.setTag("hi-" + i);
			authority.setMemo("测试权限 " + i);

			authorityRepository.save(authority);
		}
	}

}
